#pragma once

#include "D:\Development\Arduino\Arduino Environment\hardware\arduino\cores\arduino\WString.h"
#include "D:\Development\Arduino\Arduino Environment\libraries\StandardCplusplus\StandardCplusplus.h"
#include "D:\Development\Arduino\Arduino Environment\libraries\StandardCplusplus\system_configuration.h"
#include <D:\Development\Arduino\Arduino Environment\libraries\StandardCplusplus\vector>

using namespace std;

enum pinType
{
	Output = 0,
	Input = 1
};

struct pinData
{
	int pin;
	pinType type;
	int value;

	void SetValue(int newValue)
	{
		value = newValue;
	}
};

struct commandValues
{
	int pin;
	int value;
	int command;
};

struct commandData
{
	vector<commandValues> Data;
	String operationTicks;
};

class SetupData
{
private:
	vector<pinData*> _pins;
public:
	vector<commandValues> GetAllPinValuesAsCommadValues();
	void ParseFromString(String setupCommands);
	pinData* GetPinDataFromPinNumber(int pinNumber);
	pinData* GetPinDataFromIndex(int index);
	int GetNumberOfConfiguredPins();
	SetupData(void);
	~SetupData(void);
};